Skip to content

Add flow documentation generation scripts#40

Merged
RobGeada merged 1 commit into
trustyai-explainability:developfrom
RobGeada:FlowDocumentation
Apr 15, 2026
Merged

Add flow documentation generation scripts#40
RobGeada merged 1 commit into
trustyai-explainability:developfrom
RobGeada:FlowDocumentation

Conversation

@RobGeada
Copy link
Copy Markdown

Description

Addsscripts/document_flows.py which generates documentation on the available flows within the NeMo Guardrails server, including:

  • Whether the flow relies on an LLM
  • Whether the flow makes external network calls
  • List of example configurations that use this flow

Related Issue(s)

Checklist

  • I've read the CONTRIBUTING guidelines.
  • I've updated the documentation if applicable.
  • I've added tests if applicable.
  • @mentions of the person or team responsible for reviewing proposed changes.

Comment thread scripts/document_flows.py
Comment on lines +167 to +168
except Exception:
# Skip files that can't be parsed (yaml errors, etc)
Comment thread scripts/document_flows.py
Comment on lines +398 to +399
except Exception:
continue
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 10, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@4c0d47f). Learn more about missing BASE report.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop      #40   +/-   ##
==========================================
  Coverage           ?   76.88%           
==========================================
  Files              ?      200           
  Lines              ?    20412           
  Branches           ?        0           
==========================================
  Hits               ?    15693           
  Misses             ?     4719           
  Partials           ?        0           
Flag Coverage Δ
python 76.88% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread scripts/document_flows.py Outdated
if any(action_name.lower().startswith(ba) for ba in builtin_actions):
return True, False
# Unknown action - assume external to be safe
return True, False
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 # Unknown action - assume external to be safe
            return True, False

should that say False, False based on the comment?

Comment thread scripts/document_flows.py Outdated
# Patterns indicating network calls (compiled for efficiency)
NETWORK_CALL_PATTERNS = [
re.compile(r"\.post\s*\("),
re.compile(r"\.get\s*\("),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 NETWORK_CALL_PATTERNS = [
        re.compile(r"\.post\s*\("),
        re.compile(r"\.get\s*\("),

could the .get() lead to false positives?

Comment thread docs/reference/library-flows.adoc Outdated
Copy link
Copy Markdown
Collaborator

@m-misiura m-misiura Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking at the generated docs/reference/library-flows.adoc, it might be prudent to update closed source guardrail list as there have been some new guardrail additions since the last time this list was manually updated

Signed-off-by: Rob Geada <rob@geada.net>
@RobGeada RobGeada force-pushed the FlowDocumentation branch from a253c37 to 0a3dfd1 Compare April 13, 2026 11:46
@RobGeada RobGeada merged commit 6a3cfd1 into trustyai-explainability:develop Apr 15, 2026
10 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants